#ifndef __NET_H__
#define __NET_H__

#include <sys/types.h>
#include <sys/socket.h>
#define LISTEN_BACK_LOG		5

int xx_connect_host(const char * const host, const char * const port, const int type, const struct sockaddr *addr);
int xx_listen_port(int *listen_port);

int xx_readn(int sockfd, char *buf, int buf_len);
int xx_writen(int sockfd, char *buf, int buf_len);

#endif
